<script setup lang="ts">
import {
  NConfigProvider,
  NMessageProvider,
  NDialogProvider,
  NNotificationProvider,
  NLoadingBarProvider,
} from 'naive-ui';
import { zhCN, dateZhCN } from 'naive-ui';
import TheLayout from './the-layout.vue';
import { onMounted, ref } from 'vue';

const shown = ref(false);

onMounted(() => {
  shown.value = true;
});
</script>

<template>
  <NConfigProvider v-if="shown" :locale="zhCN" :date-locale="dateZhCN">
    <NMessageProvider>
      <NDialogProvider>
        <NNotificationProvider>
          <NLoadingBarProvider>
            <TheLayout />
          </NLoadingBarProvider>
        </NNotificationProvider>
      </NDialogProvider>
    </NMessageProvider>
  </NConfigProvider>
</template>
